1. Field of the Invention
The present invention relates to an imaging apparatus which detects a target image from a captured image and an imaging method.
2. Description of the Related Art
Conventional imaging apparatus such as digital cameras have various functions for users to successfully shoot a photograph. An example of such a function is an auto focus function for automatically focusing on a subject to be shot in order to acquire preferable images. Further, in recent years, imaging apparatuses have been provided with a function for detecting the face of a person as a subject through image recognition processing, and automatically focusing on the detected face when shooting a photograph of the person.
Many methods have been proposed for detecting the face of a person(s). By one method, a face candidate area is extracted which corresponds to a form of the person's face, and a face area is determined based on features in the candidate area. However, with current face detection techniques for extracting the form of a person's face, the face detection may not be accurately performed when a captured image used for the image recognition processing is blurred. Thus, the imaging apparatus may not perform automatic focusing on the face.
Japanese Patent Application Laid-Open No. 2007-10898 discusses a configuration for detecting a position of a subject's face and automatically focusing on the detected face. This automatic focusing is achieved by moving a focus lens into a predetermined lens position and executing image recognition processing after performing pan-focused processing.
Japanese Patent Application Laid-Open No. 2007-05966 discusses a configuration for moving a focus lens to a plurality of positions to shoot an image and detecting a face of a subject based on the image, in which the face of the subject is sharply captured.
However, when the lens has a shallow depth of field, the face detection may not be executed at a time in the entire distance range in which focusing can be done, from the closest distance end to the infinite distance end. More specifically, the face detection may not be capable of being executed only by moving the focus lens to a predetermined lens position and executing pan-focus processing, in the configuration discussed by Japanese Patent Application Laid-Open No. 2007-10898. Thus, a face of a person to be shot may not be detected, and the person may even be totally out of focus.
According to the method of Japanese Patent Application Laid-Open No. 2007-05966, when the lens has a shallow depth of field, it may be necessary to shoot a number of images while moving the focus position of the lens in order to cover the entire distance range from the closest distance end to the infinite distance end. This increases the number of times of recognition processing for detecting the face area. Every time the face detection is attempted, a number of images may need to be shot to cover the entire distance range from the closest distance end to the infinite distance end, thus the face detection becomes very time consuming.